package com.lomboardrisk.app.ee_new.web.jsonUtils;

import net.sf.json.JsonConfig;
import net.sf.json.processors.JsonValueProcessor;

public class MixJsonValueProcessor implements JsonValueProcessor {

	public MixJsonValueProcessor() {
	}

	public Object processObjectValue(String key, Object value,
			JsonConfig jsonConfig) {
		if (value instanceof MixBean) {
			MixBean mixObj = (MixBean) value;
			return new JSONFunctionConvert(mixObj.getValue(), mixObj.isFunction());
		}
		return value == null ? null : value.toString();
	}

	public Object processArrayValue(Object value, JsonConfig jsonConfig) {
		return null;
	}

}